//对象构造器
function Person(firstname, lastname, age, eyecolor) {
    this.firstname = firstname;
    this.lastname = lastname;
    this.age = age;
    this.eyecolor = eyecolor;
}

var myMother = new Person("bill", "gates", 62, "blue");
var myFather = new Person("steve", "jobs", 56, "green");
myFather.nationality = "English";
console.log(myFather.nationality)

myFather.name = function() {
    return this.firstname + " " + this.lastname;
}
console.log(myFather.name())

var x1 = new Object(); //var x1 = {}
var x2 = new String(); //var x2 = ""
var x3 = new Number(); //var x3 = 0
var x4 = new Boolean(); //var x4 = false
var x5 = new Array(); //var x5 = []
var x6 = new RegExp(); //var x6 = /()/
var x7 = new Function(); //var x7 = function(){}
var x8 = new Date();


function Car() {

}
var c = new Car();
console.log(Car.prototype);
console.log(c.prototype);
console.log(c.constructor);
console.log(Car.constructor);